#define _CRT_SECURE_NO_WARNINGS 1
#include "RBTree.h"
template<class K>
class set
{
public:
	struct Key0fValue
	{
		K operator()(const K& k)
		{
			return k;
		}
	};


	typedef RBTree<K, K, Key0fValue> tree;

	typedef typename tree::const_iterator iterator;
	typedef typename tree::const_iterator const_iterator;

	pair<iterator,bool> insert(const K& k)
	{
		 return _rbtree.Insert(k);
	}


	iterator begin()
	{
		return _rbtree.begin();
	}

	iterator end()
	{
		return _rbtree.end();
	}

	const_iterator begin()const
	{
		return  _rbtree.begin();
	}
	const_iterator end()const
	{
		return _rbtree.end();
	}
	
private:
 tree _rbtree;
};


void test1()
{
	set<int> s;
	s.insert(2);
	s.insert(1);
	s.insert(6);
	s.insert(4);
	s.insert(2);
	auto it = s.begin();
	while (it != s.end())
	{
		cout << *it << " ";
		++it;
	}
	



}